package com.msg.test.model;

import java.util.ResourceBundle;

/**
 * Created by Administrator on 2017/10/19 0019.
 */
public class MsgConfig {
    private static final ResourceBundle resourceBundle = ResourceBundle.getBundle("MsgConfig");
    public static String get(String key){
        return resourceBundle.getString(key);
    }

    //短信网关ip
    public static String getIsmgIp(){
        return MsgConfig.get("ismgIp");
    }
    //端口号
    public static int getIsmgPort(){
        return Integer.parseInt(MsgConfig.get("ismgPort"));
    }

    //密码
    public static String getSharedSecret(){
        return MsgConfig.get("sharedSecret");
    }

    //sp的企业代码
    public static String getSpId(){
        return MsgConfig.get("spId");
    }

    //sp的服务代码
    public static String getSpCode(){
        return MsgConfig.get("spCode");
    }

    //超时时间
    public static int getTimeOut(){
        return Integer.parseInt(MsgConfig.get("timeOut"));
    }

    //链接次数
    public static int getConnectCount(){
        return Integer.parseInt(MsgConfig.get("connectCount"));
    }
}
